package com.team.dao;

import com.team.easyexcel.DiseaseExcel;
import com.team.entity.Reservation;
import com.team.vo.StatisticalVo;
import com.team.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface ReservationMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Reservation record);

    int insertSelective(Reservation record);

    Reservation selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Reservation record);

    int updateByPrimaryKey(Reservation record);

    int insertReservation(Reservation record);

    int updateOrderById(Reservation record);

    List<Reservation> queryAllReservationsByAccount(@Param("account") String account, @Param("name") String name,@Param("visitTime") Date visitTime);

    /**
     * 查询所有由经办人身份证和姓名和电话和电话
     *
     * @param userVo 用户签证官
     * @return {@link List}<{@link Reservation}>
     */
    List<Reservation> queryAllByIdcardAndNameAndTel( UserVo userVo);

    int updateIsdalete(Integer id);



    List<Reservation> queryByNameAndIDcard(@Param("name") String name,@Param("idcard") String idcard);


    /**
     * 统计预约信息
     *
     * @return {@link List}<{@link StatisticalVo}>
     */
    List<StatisticalVo> reservationInfo();

    List<StatisticalVo> userInfo();

    List<StatisticalVo> selectByTotalPrice();

    BigDecimal selectBySidDate(@Param("date") String date, @Param("sid") Integer id);

    DiseaseExcel queryByReservationIdAndDown(int id);
}